﻿using System;
using UnityEngine;

namespace Studio
{
	// Token: 0x02000479 RID: 1145
	public static class GuideCommand
	{
		// Token: 0x0200047A RID: 1146
		public class AddInfo
		{
			// Token: 0x04001F6D RID: 8045
			public int dicKey;

			// Token: 0x04001F6E RID: 8046
			public Vector3 value;
		}

		// Token: 0x0200047B RID: 1147
		public class EqualsInfo
		{
			// Token: 0x04001F6F RID: 8047
			public int dicKey;

			// Token: 0x04001F70 RID: 8048
			public Vector3 oldValue;

			// Token: 0x04001F71 RID: 8049
			public Vector3 newValue;
		}

		// Token: 0x0200047C RID: 1148
		public class MoveAddCommand : ICommand
		{
			// Token: 0x06001C5C RID: 7260 RVA: 0x000B6EF8 File Offset: 0x000B50F8
			public MoveAddCommand(GuideCommand.AddInfo[] _changeAmountInfo)
			{
				this.changeAmountInfo = _changeAmountInfo;
			}

			// Token: 0x06001C5D RID: 7261 RVA: 0x000B6F08 File Offset: 0x000B5108
			public void Do()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.pos += this.changeAmountInfo[i].value;
					}
				}
			}

			// Token: 0x06001C5E RID: 7262 RVA: 0x000B6F6C File Offset: 0x000B516C
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C5F RID: 7263 RVA: 0x000B6F74 File Offset: 0x000B5174
			public void Undo()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.pos -= this.changeAmountInfo[i].value;
					}
				}
			}

			// Token: 0x04001F72 RID: 8050
			private GuideCommand.AddInfo[] changeAmountInfo;
		}

		// Token: 0x0200047D RID: 1149
		public class MoveEqualsCommand : ICommand
		{
			// Token: 0x06001C60 RID: 7264 RVA: 0x000B6FD8 File Offset: 0x000B51D8
			public MoveEqualsCommand(GuideCommand.EqualsInfo[] _changeAmountInfo)
			{
				this.changeAmountInfo = _changeAmountInfo;
			}

			// Token: 0x06001C61 RID: 7265 RVA: 0x000B6FE8 File Offset: 0x000B51E8
			public void Do()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.pos = this.changeAmountInfo[i].newValue;
					}
				}
			}

			// Token: 0x06001C62 RID: 7266 RVA: 0x000B7040 File Offset: 0x000B5240
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C63 RID: 7267 RVA: 0x000B7048 File Offset: 0x000B5248
			public void Undo()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.pos = this.changeAmountInfo[i].oldValue;
					}
				}
			}

			// Token: 0x04001F73 RID: 8051
			private GuideCommand.EqualsInfo[] changeAmountInfo;
		}

		// Token: 0x0200047E RID: 1150
		public class RotationAddCommand : ICommand
		{
			// Token: 0x06001C64 RID: 7268 RVA: 0x000B70A0 File Offset: 0x000B52A0
			public RotationAddCommand(GuideCommand.AddInfo[] _changeAmountInfo)
			{
				this.changeAmountInfo = _changeAmountInfo;
			}

			// Token: 0x06001C65 RID: 7269 RVA: 0x000B70B0 File Offset: 0x000B52B0
			public void Do()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.rot += this.changeAmountInfo[i].value;
					}
				}
			}

			// Token: 0x06001C66 RID: 7270 RVA: 0x000B7114 File Offset: 0x000B5314
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C67 RID: 7271 RVA: 0x000B711C File Offset: 0x000B531C
			public void Undo()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.rot = this.changeAmountInfo[i].value;
					}
				}
			}

			// Token: 0x04001F74 RID: 8052
			private GuideCommand.AddInfo[] changeAmountInfo;
		}

		// Token: 0x0200047F RID: 1151
		public class RotationEqualsCommand : ICommand
		{
			// Token: 0x06001C68 RID: 7272 RVA: 0x000B7174 File Offset: 0x000B5374
			public RotationEqualsCommand(GuideCommand.EqualsInfo[] _changeAmountInfo)
			{
				this.changeAmountInfo = _changeAmountInfo;
			}

			// Token: 0x06001C69 RID: 7273 RVA: 0x000B7184 File Offset: 0x000B5384
			public void Do()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.rot = this.changeAmountInfo[i].newValue;
					}
				}
			}

			// Token: 0x06001C6A RID: 7274 RVA: 0x000B71DC File Offset: 0x000B53DC
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C6B RID: 7275 RVA: 0x000B71E4 File Offset: 0x000B53E4
			public void Undo()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.rot = this.changeAmountInfo[i].oldValue;
					}
				}
			}

			// Token: 0x04001F75 RID: 8053
			private GuideCommand.EqualsInfo[] changeAmountInfo;
		}

		// Token: 0x02000480 RID: 1152
		public class ScaleEqualsCommand : ICommand
		{
			// Token: 0x06001C6C RID: 7276 RVA: 0x000B723C File Offset: 0x000B543C
			public ScaleEqualsCommand(GuideCommand.EqualsInfo[] _changeAmountInfo)
			{
				this.changeAmountInfo = _changeAmountInfo;
			}

			// Token: 0x06001C6D RID: 7277 RVA: 0x000B724C File Offset: 0x000B544C
			public void Do()
			{
				GlobalData.Debug_Log(".Do");
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.scale = this.changeAmountInfo[i].newValue;
					}
				}
			}

			// Token: 0x06001C6E RID: 7278 RVA: 0x000B72B0 File Offset: 0x000B54B0
			public void Redo()
			{
				this.Do();
			}

			// Token: 0x06001C6F RID: 7279 RVA: 0x000B72B8 File Offset: 0x000B54B8
			public void Undo()
			{
				for (int i = 0; i < this.changeAmountInfo.Length; i++)
				{
					ChangeAmount changeAmount = Studio.GetChangeAmount(this.changeAmountInfo[i].dicKey);
					if (changeAmount != null)
					{
						changeAmount.scale = this.changeAmountInfo[i].oldValue;
					}
				}
			}

			// Token: 0x04001F76 RID: 8054
			private GuideCommand.EqualsInfo[] changeAmountInfo;
		}
	}
}
